﻿@inherits BaseComponent

<AntCol Span="Span" Class="@Class">
    @if (NoForm)
    {
        <FieldItem Label="@Label" Class="@Class" Style="@Style">
            <div class="ant-form-item-control-input">
                <div class="ant-form-item-control-input-content">
                    @ChildContent
                </div>
            </div>
        </FieldItem>
    }
    else
    {
        <FormItem Label="@Label" Class="@Class" Style="@Style" Required="Required" Rules="Rules">
            <DataItemValue IsFixed Value="this">
                @ChildContent
            </DataItemValue>
        </FormItem>
    }
</AntCol>

@code {
    public Type Type { get; set; } = typeof(string);

    [Parameter] public int Span { get; set; }
    [Parameter] public string Class { get; set; }
    [Parameter] public string Style { get; set; }
    [Parameter] public string Label { get; set; }
    [Parameter] public bool NoForm { get; set; }
    [Parameter] public bool Required { get; set; }
    [Parameter] public FormValidationRule[] Rules { get; set; }
    [Parameter] public RenderFragment ChildContent { get; set; }
}